renaming EventEmailAgent to EmailAgent

Albert Sun 11 years ago
parent
commit
1f7dee3c72
2 changed files with 6 additions and 6 deletions
  1. 2 2
      app/models/agents/event_email_agent.rb
  2. 4 4
      spec/models/agents/event_email_agent_spec.rb

+ 2 - 2
app/models/agents/event_email_agent.rb

@@ -1,12 +1,12 @@
1 1
 module Agents
2
-  class EventEmailAgent < Agent
2
+  class EmailAgent < Agent
3 3
     include EmailConcern
4 4
 
5 5
     cannot_be_scheduled!
6 6
     cannot_create_events!
7 7
 
8 8
     description <<-MD
9
-      The EventEmailAgent sends any events it receives via email.
9
+      The EmailAgent sends any events it receives via email immediately.
10 10
       The email will be sent to your account's address and will have a `subject` and an optional `headline` before
11 11
       listing the Events.  If the Events' payloads contain a `:message`, that will be highlighted, otherwise everything in
12 12
       their payloads will be shown.

+ 4 - 4
spec/models/agents/event_email_agent_spec.rb

@@ -1,12 +1,12 @@
1 1
 require 'spec_helper'
2 2
 
3
-describe Agents::EventEmailAgent do
3
+describe Agents::EmailAgent do
4 4
   def get_message_part(mail, content_type)
5 5
     mail.body.parts.find { |p| p.content_type.match content_type }.body.raw_source
6 6
   end
7 7
 
8 8
   before do
9
-    @checker = Agents::EventEmailAgent.new(:name => "something", :options => { :expected_receive_period_in_days => 2, :subject => "something interesting" })
9
+    @checker = Agents::EmailAgent.new(:name => "something", :options => { :expected_receive_period_in_days => 2, :subject => "something interesting" })
10 10
     @checker.user = users(:bob)
11 11
     @checker.save!
12 12
   end
@@ -29,8 +29,8 @@ describe Agents::EventEmailAgent do
29 29
       event2.payload = "Something else you should know about"
30 30
       event2.save!
31 31
 
32
-      Agents::EventEmailAgent.async_receive(@checker.id, [event1.id])
33
-      Agents::EventEmailAgent.async_receive(@checker.id, [event2.id])
32
+      Agents::EmailAgent.async_receive(@checker.id, [event1.id])
33
+      Agents::EmailAgent.async_receive(@checker.id, [event2.id])
34 34
 
35 35
       ActionMailer::Base.deliveries.count.should == 2
36 36
       ActionMailer::Base.deliveries.last.to.should == ["bob@example.com"]